var url1 = '/media/img/logo.png';
var url2 = '/media/img/diagram.png';
var currentImage = 1, image;

$(function()
{
  $('#svg').svg();
  
  var svg = $('#svg').svg('get');
  image = svg.image(null, 0, 0, 400, 400, '/media/img/blank.gif');
  
  swapImage();
});

function swapImage()
{
  var url;
  
  if (currentImage === 1) {
    currentImage = 2;
    url = url2;
  } else {
    currentImage = 1;
    url = url1;
  }
  
  image.setAttribute('href', url);
  
  setTimeout(swapImage, 1000);
}
